package com.czc.cca.ddl;

import org.zoomdev.zoom.dao.ddl.*;
import org.zoomdev.zoom.dao.driver.mysql.MysqlDriver;

@_DDL_CompoundUniqueGroup({
        @_DDL_CompoundUnique(name = "UNI_date_mer_id", columns = {"date", "mer_id"})
})
@_DDL_Table(name = "s_report", simpleName = "", engine = MysqlDriver.InnoDB, comment = "商户结算统计报表")
public class _DDL_SReport {

    @_DDL_Primary()
    @_DDL_Column(name = "id", type = SqlType.BIGINT_UNSIGNED, nullable = false, comment = "")
    private java.math.BigInteger id;

    @_DDL_Column(name = "date", type = SqlType.INT_UNSIGNED, nullable = false, comment = "交易日,与t_pay一致")
    private Long date;

    @_DDL_Column(name = "mer_id", type = SqlType.BIGINT_UNSIGNED, nullable = false, comment = "商户id")
    private java.math.BigInteger merId;

    @_DDL_Column(name = "ag_id", type = SqlType.INT_UNSIGNED, nullable = false, comment = "渠道商id")
    private Long agId;

    @_DDL_Column(name = "ch_mer_id", type = SqlType.VARCHAR, size = 20, nullable = false, comment = "第三方商户id")
    private String chMerId;

    @_DDL_Column(name = "ch_ag_id", type = SqlType.VARCHAR, size = 20, nullable = false, comment = "渠道商第三方商户id")
    private String chAgId;

    @_DDL_Column(name = "ch_plat_id", type = SqlType.VARCHAR, size = 20, nullable = false, comment = "平台第三方商户id")
    private String chPlatId;

    @_DDL_Column(name = "state", type = SqlType.TINYINT_UNSIGNED, comment = "状态 0:入库 1:结算中 3 计算成功 4 计算失败 5:结算成功 6：结算有问题")
    private Integer state;

    @_DDL_Column(name = "remark", type = SqlType.VARCHAR, size = 300, comment = "备注，当结算有问题的时候写入")
    private String remark;

    @_DDL_Column(name = "cr_time", type = SqlType.TIMESTAMP, defaultFunction = MysqlDriver.CURRENT_TIMESTAMP, comment = "创建时间")
    private java.sql.Timestamp crTime;

    @_DDL_Column(name = "begin_time", type = SqlType.TIMESTAMP, comment = "结算开始时间")
    private java.sql.Timestamp beginTime;

    @_DDL_Column(name = "end_time", type = SqlType.TIMESTAMP, comment = "结算结束时间")
    private java.sql.Timestamp endTime;

    @_DDL_Column(name = "mer_rate", type = SqlType.DECIMAL, size = 6, scale = 4, nullable = false, comment = "商户费率(实际)")
    private java.math.BigDecimal merRate;

    @_DDL_Column(name = "ag_rate", type = SqlType.DECIMAL, size = 6, scale = 4, nullable = false, comment = "渠道商占比(实际)")
    private java.math.BigDecimal agRate;

    @_DDL_Column(name = "plat_rate", type = SqlType.DECIMAL, size = 6, scale = 4, nullable = false, comment = "平台占比(实际)")
    private java.math.BigDecimal platRate;

    @_DDL_Column(name = "amt", type = SqlType.DECIMAL, size = 12, scale = 2, comment = "总金额(元)")
    private java.math.BigDecimal amt;

    @_DDL_Column(name = "num", type = SqlType.INT_UNSIGNED, comment = "数量")
    private Long num;

    @_DDL_Column(name = "s_date", type = SqlType.INT_UNSIGNED, nullable = false, comment = "结算日期")
    private Long sDate;

    @_DDL_Column(name = "mer_amt", type = SqlType.DECIMAL, size = 10, scale = 2, comment = "商户剩余金额(总)")
    private java.math.BigDecimal merAmt;

    @_DDL_Column(name = "ag_amt", type = SqlType.DECIMAL, size = 10, scale = 2, comment = "渠道商手续费(总)")
    private java.math.BigDecimal agAmt;

    @_DDL_Column(name = "plat_amt", type = SqlType.DECIMAL, size = 10, scale = 2, comment = "平台手续费(总)")
    private java.math.BigDecimal platAmt;

}
